package com.august.controller;

import com.august.bean.Department;
import com.august.bean.Msg;
import com.august.service.DepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author : Crazy_August
 * @description : 部门信息
 * @Time: 2022-02-13   18:18
 */
@RestController
public class DepartmentController {

    @Autowired
    DepartmentService departmentService;

    @RequestMapping("/dept")
    public Msg getDepartments() {
        List<Department> dept = departmentService.getAllDependencies();
        return Msg.success().add("dept", dept);
    }


}
